#ifndef _LIB_ENGINE_H
#define _LIB_ENGINE_H

int exist_kv_array(const char *key);

int put_kv_array(char *key, char *value);

char* get_kv_array(char *key);

int count_kv_array();

int delete_kv_array(char *key); 





typedef struct _rbtree rbtree_t;
typedef struct _rbtree_node rbtree_node_t;



int init_rbtree(rbtree_t *tree);
void dest_rbtree(rbtree_t *tree);
int put_kv_rbtree(rbtree_t *tree, char *key, char *value);
char* get_kv_rbtree(rbtree_t *tree, char *key);
int count_kv_rbtree(rbtree_t *tree);
int exist_kv_rbtree(rbtree_t *tree, char *key);
int delete_kv_rbtree(rbtree_t *tree, char *key);








typedef struct hashtable_s hashtable_t;


int init_hashtable(hashtable_t *hash);
void dest_hashtable(hashtable_t *hash);

int put_kv_hashtable(hashtable_t *hash, char *key, char *value);
char * get_kv_hashtable(hashtable_t *hash, char *key);
int count_kv_hashtable(hashtable_t *hash);
int delete_kv_hashtable(hashtable_t *hash, char *key);
int exist_kv_hashtable(hashtable_t *hash, char *key);






typedef struct SkipList skiptable_t;
typedef struct Node  skipnode_t;

int init_skiptable(skiptable_t *table) ;
void dest_skiptable(skiptable_t *table) ;

int put_kv_skiptable(skiptable_t *table, char *key, char *value);
char *get_kv_skiptable(skiptable_t *table, char *key);
int count_kv_skiptable(skiptable_t *table);
int delete_kv_skiptable(skiptable_t *table, char *key);
int exist_kv_skiptable(skiptable_t *table, char *key) ;







#endif

